package com.atguigu.behavior.strategy;

public class ToyDuck extends Duck{

    // this doesn't work
//    FlyBehavior flyBehavior=new NoFlyBehavior();
//    QuackBehavior quackBehavior=new NoQuackBehavior();


    public ToyDuck() {
        this.setFlyBehavior(new NoFlyBehavior());
        this.setQuackBehavior(new NoQuackBehavior());
    }

    @Override
    public void init() {
        System.out.println("玩具鸭");
    }
}
